<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="en-us" />
		
		<title>Tags</title>
		
		<meta http-equiv="imagetoolbar" content="no" />
		<meta name="MSSmartTagsPreventParsing" content="true" />
		<meta name="Copyright" content="(c) 2007 Copyright content:  Copyright design: Luke Sutton" />
		
		<link rel="stylesheet" href="test.css" type="text/css" media="screen" charset="utf-8">
		
		<script type="text/javascript" language="javascript" charset="utf-8" src="../lib/prototype.js"></script>
		<script type="text/javascript" language="javascript" charset="utf-8" src="../lib/unittest.js"></script>
		<script type="text/javascript" language="javascript" charset="utf-8" src="../src/tags.js"></script>
		
	</head>
	
	<body>	
	
    <h1>Tags</h1>
		<div id="testlog"></div>
		<script type="text/javascript" charset="utf-8">
		  new Test.Unit.Runner({
		    testCreateTag: function() { with(this) {
		      var paragraph = Tag.p('testcontent', {id: 'newParagraph', class: 'testClass'});
		      assertNotNull(paragraph);
		      assertEqual('testcontent', paragraph.innerHTML);
		      assertEqual('newParagraph', paragraph.id);
		      assertEqual('testClass', paragraph.className);
		    }},
		    testTestNesting: function() { with(this) {
		      var paragraph = Tag.p(['This is ', Tag.strong('Really Lovely')]);
		      assertNotNull(paragraph);
		      assertNotNull(paragraph.innerHTML);
		      assertNotNull(paragraph.innerHTML.match(/(<strong>)/)[1])
		    }},
		    testEveryTag: function() { with(this) {
		      Tag.tagNames.each(function(tag) {
		        var newTag = Tag[tag];
		        assertNotNull(tag);
		      });
		    }},
		    testTextNodes: function() { with(this) {
		      var text = Tag.text('this is a new text node weeeeeeee');
		      assertNotNull(text);
		      assertEqual('#text', text.nodeName);
		      assertEqual('this is a new text node weeeeeeee', text.nodeValue);
		    }}
		  });
		</script>		
	
	</body>
</html>
